import axios from 'axios'

export async function preview(pageSize, page){
  const result = await axios.get('/api/upload/data/?pageSize=' + pageSize + '&page=' + page);
  return result ? result : false
}

export async function callPhone(token, phone){
  const result = await axios.get('/api/bran/record', {
    params: {
      api_token: token,
      phone: phone
    }
  });
  return result;
}
export async function status(token){
  const result = await axios.get('/api/upload/data/chart', {
    params: {
      api_token: token,
      name: 'preview'
    }
  });
  return result ? result : false;
}

export async function select(pageSize, page, status){
  const result = await axios.get('/api/upload/data/?pageSize=' + pageSize + '&page=' + page + '&status=' + status);
  return result ? result : false
}
